//
//  UCCircle.m
//  SDK开发版本
//
//  Created by 北京国泰北斗科技有限公司 on 2016/11/16.
//  Copyright © 2016年 北京国泰北斗科技有限公司. All rights reserved.
//

#import "UCCircle.h"
#import "UCMapView.h"
#import <GoogleMaps/GoogleMaps.h>

@interface UCCircle()
{
//    UCMapView *_mapView;
//    int _zIndex;
}
@property(nonatomic,strong)GMSCircle *circle;
@end

@implementation UCCircle
+ (instancetype)circleWithPosition:(CLLocationCoordinate2D)position
                            radius:(CLLocationDistance)radius{
    return [[UCCircle alloc] initCircleWithPosition:position radius:radius];
}
- (instancetype)initCircleWithPosition:(CLLocationCoordinate2D)position
                                radius:(CLLocationDistance)radius{
    self = [super init];
    if (self) {
        self.circle = [GMSCircle circleWithPosition:position radius:radius];
    }
    return self;
}
- (instancetype)init
{
    self = [super init];
    if (self) {
        self.circle = [[GMSCircle alloc] init];
    }
    return self;
}

- (void)setPosition:(CLLocationCoordinate2D)position{
    self.circle.position = position;
}
- (CLLocationCoordinate2D)position{
    return self.circle.position;
}

- (void)setRadius:(CLLocationDistance)radius{
    
    self.circle.radius = radius;
}
- (CLLocationDistance)radius{
    return self.circle.radius;
}

- (void)setStrokeWidth:(CGFloat)strokeWidth{
    
    self.circle.strokeWidth = strokeWidth;
}
- (CGFloat)strokeWidth{
    return self.circle.strokeWidth;
}

- (void)setStrokeColor:(UIColor *)strokeColor{
    
    self.circle.strokeColor = strokeColor;
}
- (UIColor *)strokeColor{
    return self.circle.strokeColor;
}

- (void)setFillColor:(UIColor *)fillColor{
    
    self.circle.fillColor = fillColor;
}
- (UIColor *)fillColor{
    return self.circle.fillColor;
}

- (void)setMapView:(UCMapView *)mapView{
    super.mapView = mapView;
    self.circle.map = [mapView valueForKey:@"map"];
}

- (void)setTappable:(BOOL)tappable{
    
    self.circle.tappable = tappable;
}
- (BOOL)isTappable{
    return self.circle.isTappable;
}

- (void)setZIndex:(int)zIndex{
    super.zIndex = zIndex;
    self.circle.zIndex = zIndex;
}

- (int)zIndex{
    return self.circle.zIndex;
}
@end
